/************************************************************
   Copyright 2008 Abhinav Pobbati

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*************************************************************/

#pragma once

#pragma unmanaged
#include <Common/Base/Math/QsTransform/hkQsTransform.h>
#pragma managed

namespace Havok4Xna {
	ref class HkVector4;
	ref class HkQuaternion;
	ref class HkTransform;
	ref class HkRotation;

	public ref class HkQsTransform : public INativeReference {
	public:
		enum class IdentityInitializer : int {
			Identity = hkQsTransform::IDENTITY
		};
		enum class ZeroInitializer : int {
			Zero = hkQsTransform::ZERO
		};

		HkQsTransform();
		HkQsTransform(IdentityInitializer init);
		HkQsTransform(ZeroInitializer init);
		HkQsTransform(HkVector4 ^translation, HkQuaternion ^rotation, HkVector4 ^scale);
		HkQsTransform(HkVector4 ^translation, HkQuaternion ^rotation);
		HkQsTransform(HkQsTransform ^t);

		void Set(HkVector4 ^translation, HkQuaternion ^rotation, HkVector4 ^scale);
		void SetIdentity();
		void SetRotation(HkRotation ^rot);
		void SetInterpolate4(HkQsTransform ^a, HkQsTransform ^b, float t);
		void SetFromTransformNoScale(HkTransform ^transform);
		void SetFromTransform(HkTransform ^transform);
		void SetInverse(HkQsTransform ^t);
		void SetMul(HkQsTransform ^t0, HkQsTransform ^t1);
		void SetMulInverseMul(HkQsTransform ^t0, HkQsTransform ^t1);
		void SetMulMulInverse(HkQsTransform ^t0, HkQsTransform ^t1);
		void SetMulEq(HkQsTransform ^t);
		bool IsOk();
		bool IsApproximatelyEqual(HkQsTransform ^t, float epsilon);
		void SetZero();
		void BlendAddMul(HkQsTransform ^t, float weight);
		void BlendNormalize(float totalWeight);
		void FastRenormalize(float totalWeight);

		DECLARE_COMPLEX_PROPERTY_GETSET(HkVector4, Translation)
		DECLARE_COMPLEX_PROPERTY_GETSET(HkVector4, Scale)
		DECLARE_COMPLEX_PROPERTY_GETSET(HkQuaternion, Rotation)

	internal:
		HK_CLASS_INTERNALS(HkQsTransform,hkQsTransform)
	};
}
